package com.xc.c1

object gouzao02 {
  def main(args: Array[String]): Unit = {
    val b = new B("aa")
    //    val x = new B()  // B() 私有

    println("2...............")
    val c = new C
    println("inName = " + c.inName + ",name = " + c.name)
    c.inName = "keke"
    println("inName = " + c.inName + ",name = " + c.name)
  }

  class A {
    println("this is A")
  }

  class B private() extends A {

    def this(name: String) {
      this
      println("B's name" + name)
    }
  }

  class C(var inName: String = "hxc") {
    var name = inName
  }


}
